const Mock = require('mockjs')
const { list } = Mock.mock({
  "list|4": [{
    "id": "@id",
    "check": true,
    "image": "@image(120x100, @color)",
    "title": "@ctitle",
    "desc": "@cword(10, 20)",
    "price|10-10000": 1,
    "count|1-5": 1,
  }]
})

module.exports = app => {
  app.get('/api/list', (req, res) => {
    res.send(list)
  })
}